package com.mszlu.blog.dao.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mszlu.blog.dao.pojo.Tag;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface TagMapper extends BaseMapper<Tag> {

    //根据文章id查询标签列表
    List<Tag> findTagsByArticleId(Long articleId);

    List<Long> findHotsTagIds(int limit);

    List<Tag> findTagNameByTagIds(/*@Param("tagIds") */List<Long> tagIds);

    IPage<Tag> getTagAll(Page<Tag> page, @Param("tagName") String tagName,@Param("description") String description);
}
